<template>
    <!-- 根据文件类型显示不同图标 -->
    <img class="item-cover-img" v-if="fileType == 'folder'" src="@/assets/image/category/folder.svg" alt="文件夹">
    <img class="item-cover-img" v-else-if="fileType === 'image'" src="@/assets/image/category/image.svg" alt="image">
    <img class="item-cover-img" v-else-if="fileType == 'audio'" src="@/assets/image/category/audio.svg" alt="video">
    <img class="item-cover-img" v-else-if="fileType == 'video'" src="@/assets/image/category/video.svg" alt="video">
    <img class="item-cover-img" v-else-if="fileType == 'pdf'" src="@/assets/image/category/pdf.svg" alt="pdf">
    <img class="item-cover-img" v-else-if="fileType == 'word'" src="@/assets/image/category/word.svg" alt="word">
    <img class="item-cover-img" v-else-if="fileType == 'excel'" src="@/assets/image/category/excel.svg" alt="excel">
    <img class="item-cover-img" v-else-if="fileType == 'ppt'" src="@/assets/image/category/ppt.svg" alt="ppt">
    <img class="item-cover-img" v-else-if="fileType == 'vue'" src="@/assets/image/category/vue.svg" alt="vue">
    <img class="item-cover-img" v-else-if="fileType == 'zip'" src="@/assets/image/category/zip.svg" alt="zip">
    <img class="item-cover-img" v-else-if="fileType === 'doc'" src="@/assets/image/category/txt.svg" alt="文档">
    <img class="item-cover-img" v-else src="@/assets/image/category/txt.svg" alt="文件">
</template>

<script setup>
const props = defineProps({
    fileType: {
        type: String,
        default: ''
    }
});
</script>

<style scoped>
.item-cover-img {
    width: 96px;
    height: 96px;
    object-fit: contain;
}
</style>